﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping;
using FluentNHibernate.Mapping;

namespace ServiceDesk.DAL
{
    public class UserMap:ClassMap<User>
    {
        public UserMap()
        {
            Id(_ => _.Guid).GeneratedBy.Guid();
            Map(_ => _.Login).Length(User.MaxLoginLength).Not.Nullable().Unique();
            Map(_ => _.Password).Length(User.MaxPasswordLength).Not.Nullable();
            Map(_ => _.UserRole).Not.Nullable();
        }
    }
}
